#pragma once

#include "irender/settings.h"
#include "imglib/avi.h"
#include "resource.h"

using namespace irender; ///!!! it's not public header

class SettingsDlg : public CDialog
{
	DECLARE_DYNAMIC(SettingsDlg)

public:
	SettingsDlg(settings & s, CWnd * pParent = 0);
	virtual ~SettingsDlg();

	enum { IDD = IDD_RENDERING_SETTINGS };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
private:
	void WriteControls();
	void ReadControls();
	void UpdateEncoderInfo();
private:
	settings & _settings;
	bool _changed; ///< true if user changed values of one or more controls but don't confirmed changes yet
	CComboBox _format_combo;
	CComboBox _field_combo;
	CComboBox _encoders_combo;
	img::avi::coder_infos _all_coders;
	img::avi::coder _coder;
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnBnClickedOk();
	afx_msg void OnCbnSelchangeFormat();
	afx_msg void OnCbnDropdownActiveEncoder();
	afx_msg void OnCbnSelchangeActiveEncoder();
	afx_msg void OnBnClickedEncoderAbout();
	afx_msg void OnBnClickedEncoderConfigure();
};
